Skip to content

fix(builder): resolve bugs on upstream flashblocks timing scheduler#89

Merged
sieniven merged 1 commit intomainfrom
niven/fix-timing-scheduler
Mar 4, 2026
Merged

fix(builder): resolve bugs on upstream flashblocks timing scheduler#89
sieniven merged 1 commit intomainfrom
niven/fix-timing-scheduler

Conversation

@sieniven
Copy link

@sieniven sieniven commented Mar 4, 2026

Summary

Based on okx/xlayer-reth#169, cherry-pick to okx/op-rbuilder for stability of the repository.

Cherry-pick fixes from okx/xlayer-reth#169 into op-rbuilder:

- Scheduler now sends immediate first flashblock trigger on FCU instead
  of waiting idle for the first interval offset
- Target flashblocks calculated via div_ceil(remaining_time, interval)
  instead of block_time / interval, aligning target count with send times
- Late FCU backwards compatibility: returns block_time instead of zero
  duration so payload building still proceeds normally
- Send offset correctly applied to every flashblock interval, not just
  first and last
- Simplified interval computation: removed truncation and deadline append
- Guard check prevents building flashblocks past target count
- Early return when target_flashblocks is zero
- Added 12 comprehensive async unit tests with tokio test-util

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sieniven sieniven merged commit e01dc9e into main Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant